package com.ctgu.service;

import com.ctgu.dao.ClientMapper;
import com.ctgu.entity.Client;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ClientServiceImpl implements ClientService{

    @Autowired
    private ClientMapper clientMapper;

    public void setClientMapper(ClientMapper clientMapper) {
        this.clientMapper = clientMapper;
    }

    @Override
    public Integer addClient(Client client) {
        return clientMapper.addClient(client);
    }

    @Override
    public Integer deleteClientById(Integer id) {
        return clientMapper.deleteClientById(id);
    }

    @Override
    public Integer updateClient(Client client) {
        return clientMapper.updateClient(client);
    }

    @Override
    public List<Client> getAllClientList() {
        return clientMapper.getAllClientList();
    }

    @Override
    public Client getClient(Integer id) {
        return clientMapper.getClient(id);
    }

    @Override
    public List<Client> queryClientById(  String name) {
        return clientMapper.queryClientById( name);
    }
}
